﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Plan.aspx.cs" Inherits="Plan" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 90px;
        }
        .style2
        {
            width: 178px;
        }
        .style3
        {
            width: 78px;
        }
        .style4
        {
            width: 193px;
        }
        .style5
        {
            width: 102px;
        }
        .style6
        {
            width: 143px;
        }
        .style7
        {
            width: 183px;
        }
        .style8
        {
            width: 106px;
        }
        .style9
        {
            width: 177px;
        }
        .style10
        {
            width: 88px;
        }
        .style11
        {
            width: 238px;
        }
        .style12
        {
            width: 110px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table style="border: 1px solid #000; width:100%;">
            <tr>
                <td class="style1" style="border: 1px solid #000;">
                    Bill Number :</td>
                <td class="style2" style="border: 1px solid #000;">
                    <asp:DropDownList ID="DropDownList1" runat="server" 
                        DataSourceID="SqlDataSource1" DataTextField="bill" DataValueField="bill" 
                        Height="22px" Width="145px">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:nourcenterConnectionString %>" 
                        SelectCommand="SELECT DISTINCT [bill] FROM [tasdeed]"></asp:SqlDataSource>
                </td>
                <td class="style3" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style4" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style12" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style6" style="border: 1px solid #000;">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1" style="border: 1px solid #000;">
                    Payment :</td>
                <td class="style2" style="border: 1px solid #000;">
                    <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" 
                        Width="145px" onselectedindexchanged="DropDownList2_SelectedIndexChanged">
                        <asp:ListItem>Check</asp:ListItem>
                        <asp:ListItem>Cash</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style3" style="border: 1px solid #000;">
                    Date :</td>
                <td class="style4" style="border: 1px solid #000;">
                    <asp:DropDownList ID="DropDownList5" runat="server" Height="22px" Width="50px">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                        <asp:ListItem>11</asp:ListItem>
                        <asp:ListItem>12</asp:ListItem>
                        <asp:ListItem>13</asp:ListItem>
                        <asp:ListItem>14</asp:ListItem>
                        <asp:ListItem>15</asp:ListItem>
                        <asp:ListItem>16</asp:ListItem>
                        <asp:ListItem>17</asp:ListItem>
                        <asp:ListItem>18</asp:ListItem>
                        <asp:ListItem>19</asp:ListItem>
                        <asp:ListItem>20</asp:ListItem>
                        <asp:ListItem>21</asp:ListItem>
                        <asp:ListItem>22</asp:ListItem>
                        <asp:ListItem>23</asp:ListItem>
                        <asp:ListItem>24</asp:ListItem>
                        <asp:ListItem>25</asp:ListItem>
                        <asp:ListItem>26</asp:ListItem>
                        <asp:ListItem>27</asp:ListItem>
                        <asp:ListItem>28</asp:ListItem>
                        <asp:ListItem>29</asp:ListItem>
                        <asp:ListItem>30</asp:ListItem>
                        <asp:ListItem>31</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList3" runat="server" style="margin-left: 5px" 
                        Width="53px">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                        <asp:ListItem>11</asp:ListItem>
                        <asp:ListItem>12</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList4" runat="server" Width="70px" Height="22px">
                        <asp:ListItem>2010</asp:ListItem>
                        <asp:ListItem>2011</asp:ListItem>
                        <asp:ListItem>2012</asp:ListItem>
                        <asp:ListItem>2013</asp:ListItem>
                        <asp:ListItem>2014</asp:ListItem>
                        <asp:ListItem>2015</asp:ListItem>
                        <asp:ListItem>2016</asp:ListItem>
                        <asp:ListItem>2017</asp:ListItem>
                        <asp:ListItem>2018</asp:ListItem>
                        <asp:ListItem>2019</asp:ListItem>
                        <asp:ListItem>2020</asp:ListItem>
                        <asp:ListItem>2021</asp:ListItem>
                        <asp:ListItem>2022</asp:ListItem>
                        <asp:ListItem>2023</asp:ListItem>
                        <asp:ListItem>2024</asp:ListItem>
                        <asp:ListItem>2025</asp:ListItem>
                        <asp:ListItem>2026</asp:ListItem>
                        <asp:ListItem>2027</asp:ListItem>
                        <asp:ListItem>2028</asp:ListItem>
                        <asp:ListItem>2029</asp:ListItem>
                        <asp:ListItem>2030</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style12" style="border: 1px solid #000;">
                    Check Number :</td>
                <td class="style6" style="border: 1px solid #000;">
                    <asp:TextBox ID="TextBox1" runat="server" style="margin-left: 0px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1" style="border: 1px solid #000;">
                    Cost :</td>
                <td class="style2" style="border: 1px solid #000;">
                    <asp:TextBox ID="TextBox2" runat="server" style="margin-left: 0px"></asp:TextBox>
                </td>
                <td class="style3" style="border: 1px solid #000;">
                    Bank :</td>
                <td class="style4" style="border: 1px solid #000;">
                    <asp:TextBox ID="TextBox3" runat="server" style="margin-left: 0px"></asp:TextBox>
                </td>
                <td class="style12" style="border: 1px solid #000;">
                    Premium :</td>
                <td class="style6" style="border: 1px solid #000;">
                    <asp:DropDownList ID="DropDownList6" runat="server">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                        <asp:ListItem>11</asp:ListItem>
                        <asp:ListItem>12</asp:ListItem>
                        <asp:ListItem>13</asp:ListItem>
                        <asp:ListItem>14</asp:ListItem>
                        <asp:ListItem>15</asp:ListItem>
                        <asp:ListItem>16</asp:ListItem>
                        <asp:ListItem>17</asp:ListItem>
                        <asp:ListItem>18</asp:ListItem>
                        <asp:ListItem>19</asp:ListItem>
                        <asp:ListItem>20</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style2" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style3" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style4" style="border: 1px solid #000;">
                    <asp:Button ID="Button1" runat="server" Height="35px" Text="Add" Width="95px" 
                        onclick="Button1_Click" />
                </td>
                <td class="style12" style="border: 1px solid #000;">
                    &nbsp;</td>
                <td class="style6" style="border: 1px solid #000;">
                    &nbsp;</td>
            </tr>
        </table>
    
    </div>
    <p>
        &nbsp;</p>
    <p>
        <table style="width: 100%; border: 1px solid #000;">
            <tr>
                <td class="style8" style="border: 1px solid #000;">
                    Bill Number :</td>
                <td class="style9" style="border: 1px solid #000;">
                    <asp:DropDownList ID="DropDownList9" runat="server" 
                        DataSourceID="SqlDataSource1" DataTextField="bill" DataValueField="bill" 
                        Height="22px" Width="145px" AutoPostBack="True">
                    </asp:DropDownList>
                </td>
                <td class="style10" style="border: 1px solid #000;">
                    Premium :</td>
                <td class="style11" style="border: 1px solid #000;">
                    <asp:DropDownList ID="DropDownList10" runat="server" 
                        DataSourceID="SqlDataSource4" DataTextField="premium" DataValueField="premium">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:nourcenterConnectionString %>" 
                        SelectCommand="SELECT [premium] FROM [payment] WHERE ([bill] = @bill)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="DropDownList9" Name="bill" 
                                PropertyName="SelectedValue" Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
                <td style="border: 1px solid #000;">
                    <asp:Button ID="Button2" runat="server" Height="35px" onclick="Button2_Click" 
                        Text="Payed" Width="95px" />
                </td>
            </tr>
        </table>
    </p>
    <p>
        &nbsp;</p>
    <table style="border: 1px solid #000; width:100%;">
        <tr>
            <td class="style5" style="border: 1px solid #000;">
                Bill Number :</td>
            <td class="style7" style="border: 1px solid #000;">
                <asp:DropDownList ID="DropDownList8" runat="server" Width="145px" 
                    DataSourceID="SqlDataSource2" DataTextField="bill" DataValueField="bill" 
                    AutoPostBack="True">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:nourcenterConnectionString %>" 
                    SelectCommand="SELECT DISTINCT [bill] FROM [payment]"></asp:SqlDataSource>
            </td>
            <td style="border: 1px solid #000;">
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="3" style="border: 1px solid #000;">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="SqlDataSource3">
                    <Columns>
                        <asp:BoundField DataField="kindofpaying" HeaderText="kindofpaying" 
                            SortExpression="kindofpaying" />
                        <asp:BoundField DataField="datee" HeaderText="datee" SortExpression="datee" />
                        <asp:BoundField DataField="number" HeaderText="number" 
                            SortExpression="number" />
                        <asp:BoundField DataField="cost" HeaderText="cost" SortExpression="cost" />
                        <asp:BoundField DataField="bank" HeaderText="bank" SortExpression="bank" />
                        <asp:BoundField DataField="delevered" HeaderText="delevered" 
                            SortExpression="delevered" />
                        <asp:BoundField DataField="premium" HeaderText="premium" 
                            SortExpression="premium" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:nourcenterConnectionString %>" 
                    SelectCommand="SELECT [kindofpaying], [datee], [number], [cost], [bank], [delevered], [premium] FROM [payment] WHERE ([bill] = @bill)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList8" Name="bill" 
                            PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
